package com.tttn.docbao.until;

import java.util.ArrayList;

import android.annotation.SuppressLint;

import com.tttn.docbao.R;

public class Core {
	public static final int DATABASE_VERSION = 1;

	// server
	public static final String URL = "http://192.168.100.25:8080/docbao/api/";

	// Database Name
	@SuppressLint("SdCardPath")
	public static String DB_PATH = "/data/data/com.tttn.docbao/databases/";
	public static final String DATABASE_NAME = "docbao";

	// key
	public static final String KEY_ID = "idnoidung";
	public static final String KEY_IDDANHMUC = "iddanhmuc";
	public static final String KEY_TIEUDE = "tieude";
	public static final String KEY_TOMTAT = "tomtat";
	public static final String KEY_TENBAO = "tenbao";
	public static final String KEY_NOIDUNG = "noidung";
	public static final String KEY_THOIGIAN = "thoigian";
	public static final String KEY_DANTRI = "dantri";
	public static final String KEY_VNEXPRESS = "vnexpress";
	public static final String KEY_BAO24 = "bao24";
	// TAG
	public static final String TAG_GETDATA = "getdata";
	public static final String TAG_STARTAPP = "startapp";

	public static ArrayList<String> getB() {
		ArrayList<String> name = new ArrayList<String>();
		name.add("Dantri.com");
		name.add("Vnexpress.net");
		name.add("24h.com.vn");
		return name;
	}

	public static int getType(String type) {
		if (type.equals("Dantri.com") || type.equals("Vnexpress.net")) {
			return 1;
		} else
			return 2;
	}

	public static String convertName(String name) {
		if (name.equals("Dantri.com")) {
			return "dantri";
		} else if (name.equals("Vnexpress.net")) {
			return "vnexpress";
		} else {
			return "bao24";
		}
	}

}
